home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / lu62 / port / bss0.h < prev    next >
C/C++ Source or Header  |  1996-07-10  |  28KB  |  810 lines

  1. /* k 0224     23/09/91      */
  2. /* k 0225    23/09/91    */
  3. /* k 0226     24/09/91          */
  4. /* k 0230       09/10/91        *//* assemble some data */
  5. /* k 0231       10/10/91        *//* resident module */
  6. /* k 0233    12/10/91    *//* Trn modules */
  7. /* k 0234       14/10/91        *//* OVL_TYPE */
  8. /* k 0235    18/10/91    *//* pswitch for showdata */
  9. /* k 0243    20/10/91    *//* common resources */
  10. /* k 0254       01/11/91        *//* yes, no */
  11. /* k 0264       12/11/91        *//* New code tables */
  12. /* k 5001       18/11/91        *//* from KIROV      */
  13. /* k 0282      12/12/91         *//* from BSS */
  14. /* k 0292       23/12/91        *//* save initial path */
  15. /* k 0304    23/02/92    *//*    path     */
  16. /* k 0306       24/02/92        *//* ddoff */
  17. /* k 0307       24/02/92        *//* 300-byte segments */
  18. /* k 0320    22/03/92    *//* New initialization */
  19. /* k 1082       23/03/92        *//* definition bufvt,buflan */
  20. /* k 1083       25/03/92        *//* SOLARIS-2 adapter       */
  21. /* k 0322    26/03/92    *//* Files menu */
  22. #include <include.h>
  23. #include <vt.h>
  24. #include <conio.h>
  25. #include <emadapt.h>
  26. #include <bufmap.h>
  27. #include <dcr.h>
  28. #include <tbs.h>             /* 5001 */
  29. #include <tabm.h>
  30. #include <popen39.h>
  31. #include <pget39.h>
  32. #include <pfree39.h>
  33. #include <pwrite39.h>
  34. #include <pread39.h>
  35. #include <bufdrv.h>
  36. #include <p3927c.h>   /*ßΓpπ¬Γπpδ ææé ¿ ßΓpπ¬Γπpδ ñ«»«½¡¿Γѽ∞¡δσ »ápá¼ÑΓp«ó drvtrn39*/
  37. #include <p3926c.H>    /* TRANSMIT */
  38. #include <p3928c.H>    /* RECEIVE  */
  39. #include <p390bc.H>    /* BUFFER_GET  */
  40. #include <p3915c.H>    /* BUFFER_FREE  */
  41. #include <p3915t.H>    /* OPEN          */
  42. #include <p3916c.H>    /* CLOSE */
  43. #include <p3927t.H>
  44. #include <p3928t.H>
  45. #include <p390bt.H>
  46. #include <p3926t.H>          /* 5001 */
  47. #define MAXDIR 66    /* @0322 */
  48. struct    SREGS    {
  49.     unsigned int    es;
  50.     unsigned int    cs;
  51.     unsigned int    ss;
  52.     unsigned int    ds;
  53. };
  54. struct WORDREGS {
  55.     unsigned int    ax, bx, cx, dx, si, di, cflag, flags;
  56. };
  57.  
  58. struct BYTEREGS {
  59.     unsigned char    al, ah, bl, bh, cl, ch, dl, dh;
  60. };
  61.  
  62. union    REGS    {
  63.     struct    WORDREGS x;
  64.     struct    BYTEREGS h;
  65. };
  66. struct buf_vt  {    /* @0233 */
  67. #if (OS_TYPE!=0)    /* @0215 */
  68.  unsigned  char contents [4000];     /* @0208 */
  69. #endif            /* @0215 */
  70.  unsigned  int cursor_size;
  71.   int curx,cury,currmode;    /* @0233 */
  72.  unsigned char winleft,wintop,winright,winbottom;
  73.            };
  74.  extern int
  75. #if (OVL_TYPE==1)
  76.  Trn_frame(),Trn_set(),Trn_logon(),Trn_data(),Trn_logoff(),
  77.  Trn_status(),Trn_vpexit();
  78. #else
  79.  frame(),signon(),set(),logon(),data(),logoff(),
  80.             status(),vpexit();
  81.  extern int frame0(),frame1();
  82.  extern int status0(),status1();
  83.  extern int exit1(),exit0();
  84.  extern int logoff0(),logoff1(),logoff2(),logoffgo();                   /* 0014 */
  85.  extern int data0(),data1(),data2(),data3(),data4(),data5();
  86.  extern int data6(),data7(),data8(),data9(),data10();    /* @0060 */    /* @0057 */
  87.  extern int data11(),data12();                /* @0061 */    /* @0060 */
  88.  extern  int logon0(),logon1(),logon2(),logon3(),logonexit();
  89.  extern  int signon0();
  90.  extern  int signon1();
  91.  extern  int signon2();
  92.  extern int set0(),set1(),set2(),set3(),set4(),set5(),set6();
  93. #endif
  94.  extern struct rqb *appl(),*path(),*sessa(),*fisc(),*csc(),*cpmgr();
  95.  extern struct rqb *pu(),*dfc(),*pfrom(),*landlc(),*config(),*npinput();
  96.  extern struct rqb *dlc7920();                    /* 1001 */
  97.  extern struct rqb *dlc7920s();                    /* 1083 */
  98.  extern struct rqb *dlctrn();                                   /* 1007 */
  99.  extern struct rqb *dlctrn39();                                 /* 1007 */
  100.  extern struct rqb *dlcasync();                                 /* 1051 */
  101.  extern struct rqb *dataw_code();        /* @0072 */
  102.  char *rentdos=NULL;
  103.  short curs[5]={0},curx[5]={0},cury[5]={0};            /* 0014 */
  104.  short cur_curs=0,cur_curx=0,cur_cury=0;
  105.   short com_v=0;
  106.                     /* @0046 */        /* 0017 */
  107.                     /* @0046 */
  108.                     /* @0046 */
  109.  char sw_wait=0x00;    /* @0184 */
  110.  char xwbuf[256]={0x00};                    /* @0192 */
  111.  char wbuf[256]={0x00};                    /* @0192 */
  112.  char wbufd[256]={0x00};                    /* @0192 *//* @0243 */
  113.  struct mat (*wmat)[3]={NULL};                /* @0054 */
  114.  short ddfff=0;            /* @0200 */    /* @0044 *//* @0159 */
  115.  /* @0159 */
  116.  char *filename={"                                      "};/* @0060 */
  117.  struct segoff {                               /* @0158 *//* @0158 */
  118.    unsigned short seg;               /* @0159 */           /* @0158 */
  119.    unsigned short off;               /* @0158 */             /* @0158 */
  120.                };                    /* @0159 */
  121.  struct segoff (*dout)[512]={NULL};       /* @0158 *//* @0159 */
  122.  long cseek=0, nseek=0, oldseek=0;        /* @0157 @0158 *//* @0160 */
  123.  char d_g[]="\\d";        /* @0174 *//* @0184 */
  124.  unsigned short lasti=0,curi=0,curseg=0;       /* @0159 */
  125. char mail[]="mail\\";    /* @0157 *//* @0304 */
  126. char dpp[60]={0x00};    /* @0306 */
  127. char ddpp[60]={0x00};    /* @0157 *//* @0243 *//* @0306 */
  128.  char dtxt8[]="     ";        /* TEMPORARY */
  129.   char eoflag=0x00;        /* @0161 */
  130.   short type=0;
  131.   short nida=0,oldnida=0;            /* @0060 */        /* @0057 */
  132.   struct rqb *nrda=NULL,*crda=NULL,
  133.       *orda=NULL,*oldnrda=NULL;    /* @0060 */    /* @0057 */
  134.   short last=0;                 /* @0060 */
  135.   unsigned short plj=0,lj=0;/* @0061 @0060 @0158 *//* @0159 */
  136.   short fdd=0,fddd=0,le=0;    /* @0159 */
  137.   short dfdd=0;        /* @0243 */
  138.   unsigned char *tp=NULL;        /* @0061 *//* @0184 */
  139.   long sendno=0;                        /* @0072 */
  140.   char scrn=0x00;                    /* 0017 */
  141.   struct rqb *rqbp=NULL;
  142.   struct segprf *segp=NULL;
  143.   struct init3 *wp=NULL;            /* @0050 */        /*  0017 */
  144.   char rhhdr0[3]={0x63,0x80,0x00};                /* @0048 */
  145. char cond=0x00;                            /* 0017 */
  146. char name[8]="";
  147.    short signbuf[5]={Bufsign1,Bufsign2,Bufsign3,
  148.              Bufsign4,Bufsign5};        /* @0208 */
  149.    short sigsw[5]={0,0,0,0,0};                                  /* @0029 */
  150.    short ss[5]={0};                                                 /* @0029 */
  151.    char *pt1=NULL,*pt2=NULL,*pt3=NULL;
  152. unsigned char *rdos=NULL;        /* @0201 */
  153. short msg28=0;            /* @0201 */
  154.   struct nau *vtnau=NULL;                        /* @0044 */
  155.    char ch[26]={0};
  156.    short l=0,j=0;
  157.    short leng=0;                            /* @0044 */
  158. short px1=0,py1=0,px2=0,py2=0,pcurx=0,pcury=0,pxw=0,pyw=0;
  159. char *begpt=NULL,*curpt=NULL;
  160. char pattr='\0';
  161. union REGS reg={0};
  162. short offs=0;
  163. short hoffs=0;    /* @0233 */
  164.   short textcol[5]={0},backcol[5]={0};           /* 0014 */     /* 0017 */
  165.  short msw2=0;        /* @0221 */
  166.   int akey=0,bkey=0;
  167. struct ekran {
  168.    char icon;
  169.    char attrib;
  170.     };
  171. /* @0264 */
  172. int attr_addr[1920]={0};
  173. char  buffer [1920]={0x00}, attrib[16]={0x00};
  174. struct ekran screen [1920]={0};
  175.  int   cursor_pos=0,laddr=0, haddr=0,
  176.  enable_flag_port=ON,enable_flag_kbd=ON,enable_flag_sys=ON;
  177. char *mix=NULL;
  178. int cursor_row=0, cursor_col=0;
  179. int ind_y=0;
  180. unsigned int enable_x1=0,enable_x2=0,insert_x=0,insert=0;
  181.  
  182. int portkey=0;
  183.  
  184. int swi=0;
  185.  
  186. char colortable[256]={0x00};
  187. unsigned int oldcursor=0, shortcursor=0,
  188.  tallcursor=0, nocursor=0x2000,vissegment=0;
  189. unsigned int baseport=0;
  190. struct save_7927  buf7927={0};    /* @0208 */
  191.  
  192. struct buf_dos {
  193. #if (OS_TYPE!=0)    /* @0215 */
  194.  unsigned char contents [4000];     /* @0208 */
  195. #endif            /* @0215 */
  196.  unsigned int cursor_size;
  197.  int curx,cury,currmode;    /* @0233 */
  198. } buf2580={0};
  199.  
  200. char fmindex[] =           /* 255 means that profile is not allowed */
  201.  {0,       /*  0 */
  202.  255,      /*  1 */
  203.  1,        /*  2 */
  204.  2,        /*  3 */
  205.  3,        /*  4 */
  206.  4,        /*  5 */
  207.  255,      /*  6 */
  208.  5,        /*  7 */
  209.  255,255,255,255,255,255,255,255,255,  /* 8-16 */
  210.  6,        /* 17 */
  211.  7};       /* 18 */
  212.  
  213. char tsindex[] =           /* 255 means that profile is not allowed */
  214. {255,      /*  0 */
  215. 0,         /*  1 */
  216. 1,         /*  2 */
  217. 2,         /*  3 */
  218. 3,         /*  4 */
  219. 4,         /*  5 */
  220. 255,       /*  6 */
  221. 5,         /*  7 */
  222. 255,255,255,255,255,255,255,255,255};  /* 8-16 */
  223.  
  224. /* sessa */
  225.   struct avt0 *avt=NULL;    /* AVT table */        /* @0087 */
  226.   unsigned char Flag28=0x00;        /* @0201 */
  227.   unsigned char Flagport=0x00;        /* @0201 */
  228.   unsigned char optflg=0x00,flag2=0x00,tf=0x00,sflag=0x00;  /* @0203 */
  229.   /* @0230 */
  230.   struct prqb *first_rqb=NULL;                     /* @0023 */
  231.   struct prqb *last_rqb=NULL;                                   /* @0023 */
  232.   struct wrktb tmp2tb[1]={0};   /* 1005 */
  233.   char *ptr=NULL;                             /* @0088 */         /* @0023 */
  234.   /* @0230 */
  235.   short bfd=0;        /* @0206 */
  236.   struct srdt *ws=NULL;
  237.   struct rdt *wr=NULL;
  238.   struct mat *wn=NULL;
  239.   struct dlctb *wd=NULL;         /* @0043 */
  240.   struct majtb *wm=NULL;
  241.   struct aname (*wa)[3]={NULL};
  242.   struct nau *wnau=NULL;
  243.   /* @0205 */
  244.   short rc=0;              /* @0043 */
  245. /* @0304 */
  246. struct buf_vt bufvt2580={0};    /* @0215 *//* @0233 */
  247. char far *videobuf=NULL;        /* @0207 */
  248.  short  sw1=0;
  249.  short  sw2[5]={0,0,0,0,0};                       /* 0014 */
  250.  short  x1[5]={0},y1[5]={0},x2[5]={0},y2[5]={0};       /* 0014 */
  251.  short escptr[5]={0};      /* @0206 */                        /* 0014 */
  252.  short  esc=0;
  253.  short hsw=0;
  254.  short msw=0;
  255.  short input=0;
  256.  char escflg=0x00;            /* @0046 */
  257.  (*escrtn)()=NULL;            /* @0046 */
  258.  char save25[80]={0x00};
  259.  short escape=256+94;          /* escape code CTRL F1 */
  260.                                 /* 0014 */
  261.  char vt_flag=0x00;
  262.  short scr_no=0;
  263.   short unit[4]={2020,100,8,272};     /* @0307 */
  264.   short nu=0;
  265.                                 /* 0017 */
  266.   short class=0;
  267.                                 /* @0034 */
  268.   struct rqb *bufp=NULL;
  269.   short *pf=NULL;
  270.  char dispflag='\0';        /* @0056 */
  271. char pww[16]={0x00};                        /* @0071 */
  272. char outbuffer[1920]={0x00};    /* @0185 */
  273. struct out7920 *out7920=NULL;/* @0185 */
  274.  
  275. int col=0;    /* @0185 */
  276. int row=0;    /* @0185 */
  277. int color=0;    /* @0185 */
  278. int width=0;    /* @0185 */
  279. /*   va_list arg_list;  */  /* @0185 */
  280.   struct parmglu *wglu=NULL;
  281.   struct tmp2 *wtmp2=NULL;
  282.   struct sess *wsess=NULL;
  283.   struct majtb *wmtb=NULL;
  284.   struct nausg *wnseg=NULL;
  285.   struct segprf *wseg=NULL;
  286.   struct th *wth=NULL;
  287.   struct rh *wrh=NULL;        /* @0157 */
  288.   union ru *wru=NULL;
  289.   struct hscb *whscb=NULL;
  290.   struct lhscb *wlhscb=NULL;
  291.   struct bind *wbind=NULL;                                 /* 1003 */
  292.   char out_buffer[1920]={0};  /* 1003 *//* @0175 */
  293.   struct rqb *rrqb=0;
  294.   int was_bufm=0;
  295.   int was_vvodz=0;
  296. char opr[20]={0};
  297. /* 5001  */
  298.  
  299. unsigned char a_to_e[256]={
  300.                             0X00,0X01,0X02,0X03,0X37,0X2D,0X2E,0X2F,/*0*/
  301.                             0x16,0x05,0x25,0x0b,0x0c,0x0d,0x0e,0x0f,
  302.                             0X10,0X11,0X12,0X13,0X3C,0X3D,0X32,0X26,/*1*/
  303.                             0x18,0x19,0x3f,0x27,0x1c,0x1d,0x1e,0x1f,
  304.                             0X40,0X4F,0X7F,0X7B,0X5B,0X6C,0X50,0X7D,/*2*/
  305.                             0x4d,0x5d,0x5c,0x4e,0x6b,0x60,0x4b,0x61,
  306.                             0XF0,0XF1,0XF2,0XF3,0XF4,0XF5,0XF6,0XF7,/*3*/
  307.                             0xf8,0xf9,0x7a,0x5e,0x4c,0x7e,0x6e,0x6f,
  308.                             0X7C,0XC1,0XC2,0XC3,0XC4,0XC5,0XC6,0XC7,/*4*/
  309.                             0xc8,0xc9,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,
  310.                             0XD7,0XD8,0XD9,0XE2,0XE3,0XE4,0XE5,0XE6,/*5*/
  311.                             0xe7,0xe8,0xe9,0x4a,0xe0,0x5a,0x5f,0x6d,
  312.                             0X79,0X81,0X82,0X83,0X84,0X85,0X86,0X87,/*6*/
  313.                             0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,
  314.                             0X97,0X98,0X99,0XA2,0XA3,0XA4,0XA5,0XA6,/*7*/
  315.                 0xa7,0xa8,0xa9,0xc0,0x6a,0xd0,0xa1,0x07,
  316. #if (KOI8_TYPE == 0)    /* Alternate coding */    /* @0181 */
  317.                             0XC1,0XBA,0XC2,0XBF,0XBC,0XC5,0XEC,0XFA,/*8*/
  318.                             0xcb,0xcc,0xd2,0xce,0xd4,0xc8,0xd6,0xdc,
  319.                             0XD7,0XC3,0XE3,0XEB,0XBE,0XE7,0XBB,0XFE,/*9*/
  320.                             0xfb,0xfd,0x7d,0xef,0xee,0xfc,0xb8,0xdd,
  321.                             0X81,0X78,0XAF,0X8D,0X8A,0X85,0XAE,0XB2,/*A*/
  322.                             0x8f,0x90,0x9a,0x9b,0x9c,0x9d,0x96,0x9f,
  323.                             0X2B,0X2C,0X09,0X20,0X29,0X43,0X44,0X45,/*B*/
  324.                             0x46,0x39,0x30,0x38,0x08,0x47,0x48,0x28,
  325.                             0X23,0X24,0X06,0X21,0X15,0X2A,0X49,0X51,/*C*/
  326.                             0x33,0x1a,0x34,0x36,0x31,0x35,0x3a,0x52,
  327.                             0X53,0X54,0X56,0X57,0X62,0X63,0X64,0X65,/*D*/
  328.                 0x66,0x17,0x22,0x14,0x04,0x0a,0x1b,0x3b,
  329. #else            /* GOST */    /* @0181 */
  330.                 0X2B,0X2C,0X09,0X20,0X29,0X43,0X44,0X45,/*8*/
  331.                             0x46,0x39,0x30,0x38,0x08,0x47,0x48,0x28,
  332.                 0X23,0X24,0X06,0X21,0X15,0X2A,0X49,0X51,/*9*/
  333.                             0x33,0x1a,0x34,0x36,0x31,0x35,0x3a,0x52,
  334.                 0X53,0X54,0X56,0X57,0X62,0X63,0X64,0X65,/*A*/
  335.                             0x66,0x17,0x22,0x14,0x04,0x0a,0x1b,0x3b,
  336.                 0XC1,0XBA,0XC2,0XBF,0XBC,0XC5,0XEC,0XFA,/*B*/
  337.                             0xcb,0xcc,0xd2,0xce,0xd4,0xc8,0xd6,0xdc,
  338.                 0XD7,0XC3,0XE3,0XEB,0XBE,0XE7,0XBB,0XFE,/*C*/
  339.                             0xfb,0xfd,0x7d,0xef,0xee,0xfc,0xb8,0xdd,
  340.                 0X81,0X78,0XAF,0X8D,0X8A,0X85,0XAE,0XB2,/*D*/
  341.                             0x8f,0x90,0x9a,0x9b,0x9c,0x9d,0x96,0x9f,
  342. #endif                    /* @0181 */
  343.                             0X97,0X83,0XAC,0XAD,0X8C,0XA7,0X80,0XB6,/*E*/
  344.                             0xb3,0xb5,0xb7,0xb1,0xb0,0xb4,0x76,0xa0,
  345.                             0XC5,0X85,0X62,0X63,0X64,0X65,0X66,0X67,/*F*/
  346.                             0x68,0x69,0x70,0x71,0x72,0x73,0x74,0xff };
  347. unsigned char e_to_a[256]={ 0X00,0X01,0X02,0X03,0XDC,0X09,0XC2,0X7F,/*0*/
  348.                             0xbc,0xb2,0xdd,0x0b,0x0c,0x0d,0x0e,0xff,
  349.                             0X10,0X11,0X12,0X13,0XDB,0XC4,0X08,0XD9,/*1*/
  350.                             0x18,0x19,0xc9,0xde,0x1c,0x1d,0x1e,0x1f,
  351.                             0XB3,0XC3,0XDA,0XC0,0XC1,0X0A,0X17,0X1B,/*2*/
  352.                             0xbf,0xb4,0xc5,0xb0,0xb1,0x05,0x06,0x07,
  353.                             0XBA,0XCC,0X16,0XC8,0XCA,0XCD,0XCB,0X04,/*3*/
  354.                             0xbb,0xb9,0xce,0xdf,0x14,0x15,0xfd,0x1a,
  355.                             0X20,0XFA,0XF0,0XB5,0XB6,0XB7,0XB8,0XBD,/*4*/
  356.                             0xbe,0xc6,0x5b,0x2e,0x3c,0x28,0x2b,0x21,
  357.                             0X26,0XC7,0XCF,0XD0,0XD1,0XFB,0XD2,0XD3,/*5*/
  358.                             0xfc,0xf1,0x5d,0x24,0x2a,0x29,0x3b,0x5e,
  359.                             0X2D,0X2F,0XD4,0XD5,0XD6,0XD7,0XD8,0XF2,/*6*/
  360.                             0xf3,0xf4,0x7c,0x2c,0x25,0x5f,0x3e,0x3f,
  361. #if (KOI8_TYPE==0)    /* Alternate coding */    /* @0181 */
  362.                 0XF5,0XF6,0XF7,0XF8,0XF9,0X9A,0XEE,0XA0,/*7*/
  363.                             0xa1,0x60,0x3a,0x23,0x40,0x27,0x3d,0x22,
  364.                             0XE6,0X61,0X62,0X63,0X64,0X65,0X66,0X67,/*8*/
  365.                             0x68,0x69,0xa4,0xa5,0xe4,0xa3,0xe5,0xa8,
  366.                             0XA9,0X6A,0X6B,0X6C,0X6D,0X6E,0X6F,0X70,/*9*/
  367.                             0x71,0x72,0xaa,0xab,0xac,0xad,0xae,0xaf,
  368.                             0XEF,0X7E,0X73,0X74,0X75,0X76,0X77,0X78,/*A*/
  369.                             0x79,0x7a,0xe0,0xe1,0xe2,0xe3,0xa6,0xa2,
  370.                             0XEC,0XEB,0XA7,0XE8,0XED,0XE9,0XE7,0XEA,/*B*/
  371.                             0x9e,0x80,0x81,0x96,0x84,0x85,0x94,0x83,
  372.                             0X7B,0X41,0X42,0X43,0X44,0X45,0X46,0X47,/*C*/
  373.                             0x48,0x49,0x95,0x88,0x89,0x8a,0x8b,0x8c,
  374.                             0X7D,0X4A,0X4B,0X4C,0X4D,0X4E,0X4F,0X50,/*D*/
  375.                             0x51,0x52,0x8d,0x8e,0x8f,0x9f,0x90,0x91,
  376.                             0X5C,0XCF,0X53,0X54,0X55,0X56,0X57,0X58,/*E*/
  377.                             0x59,0x5a,0x92,0x93,0x86,0x82,0x9c,0x9b,
  378.                             0X30,0X31,0X32,0X33,0X34,0X35,0X36,0X37,/*F*/
  379.                 0x38,0x39,0x87,0x98,0x9d,0x99,0x97,0xff };
  380. #else            /* GOST */    /* @0181 */
  381.                 0XF5,0XF6,0XF7,0XF8,0XF9,0X9A,0XEE,0Xd0,/*7*/
  382.                 0xd1,0x60,0x3a,0x23,0x40,0x27,0x3d,0x22,
  383.                             0XE6,0X61,0X62,0X63,0X64,0X65,0X66,0X67,/*8*/
  384.                 0x68,0x69,0xd4,0xd5,0xe4,0xd3,0xe5,0xd8,
  385.                 0Xd9,0X6A,0X6B,0X6C,0X6D,0X6E,0X6F,0X70,/*9*/
  386.                 0x71,0x72,0xda,0xdb,0xdc,0xdd,0xde,0xdf,
  387.                             0XEF,0X7E,0X73,0X74,0X75,0X76,0X77,0X78,/*A*/
  388.                 0x79,0x7a,0xe0,0xe1,0xe2,0xe3,0xd6,0xd2,
  389.                 0XEC,0XEB,0Xd7,0XE8,0XED,0XE9,0XE7,0XEA,/*B*/
  390.                 0xce,0xb0,0xb1,0xc6,0xb4,0xb5,0xc4,0xb3,
  391.                             0X7B,0X41,0X42,0X43,0X44,0X45,0X46,0X47,/*C*/
  392.                 0x48,0x49,0xc5,0xb8,0xb9,0xba,0xbb,0xbc,
  393.                             0X7D,0X4A,0X4B,0X4C,0X4D,0X4E,0X4F,0X50,/*D*/
  394.                 0x51,0x52,0xbd,0xbe,0xbf,0xcf,0xc0,0xc1,
  395.                             0X5C,0XCF,0X53,0X54,0X55,0X56,0X57,0X58,/*E*/
  396.                 0x59,0x5a,0xc2,0xc3,0xb6,0xb2,0xcc,0xcb,
  397.                             0X30,0X31,0X32,0X33,0X34,0X35,0X36,0X37,/*F*/
  398.                 0x38,0x39,0xb7,0xc8,0xcd,0xc9,0xc7,0xff };
  399. #endif                    /* @0181 */
  400. struct dcr dcr={0};
  401. struct dcr_el dcr_el={0};
  402. struct dcr ddcr={0};    /* @0243 */
  403. struct dcr_el ddcr_el={0};         /* @0243 */
  404. struct rqb *dataq=0;
  405. char user[8]={0x00};            /* @0157 */
  406. char duser[8]={0x00};            /* @0157 *//* @0243 */
  407. struct data2 *wda=NULL;
  408. int fff=0;         /* @0157 *//* @0159 */
  409. int cry=0;    /* @0186 */
  410. struct rqb *qrp=NULL;   /* @0158 */
  411. struct dcr *d_crec=NULL;          /* @0157 */
  412. struct dcr *dd_crec=NULL;          /* @0157 *//* @0243 */
  413. struct dcr_el *del=NULL;          /* @0157 */
  414. struct dcr_el *ddel=NULL;          /* @0157 *//* @0243 */
  415. struct nextprev {            /* @0159 */
  416.   long next;                 /* @0159 */
  417.   long prev;                 /* @0159 */
  418.         } nextprev={0};  /* @0159 */
  419. long seek=0;                    /* @0157 *//* @0158 */
  420. short doff=0;                  /* @0157 */
  421. short ddoff=0;                 /* @0306 */
  422. unsigned char shiftfl=0x04;             /* @0201 */
  423. struct naus0 *nps=NULL;
  424. int (*(pswitch[10]))()={        /* @0235 *//* @0322 */
  425.        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
  426.        NULL};    /* @0225 */    /* @0322 */
  427.   char inithdr[3]={0x01,0x06,0x81};                /* @0048 */
  428. char termhdr[3]={0x01,0x06,0x83};                /* @0055 */
  429.  struct rqb *((*(funct_table[ST_N]))())={
  430.        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
  431.        NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}; /* 1083 */
  432. /* @0264 */
  433. char b_ins[]="INS";
  434.  char twoblanks[]="  ";
  435. char u2[]="%2u";    /* @0226 */
  436. char u4[]="%.4u";    /* @0226 */
  437. char u5[]="%5u";    /* @0226 */
  438. char pgdn[]="PgDn";    /* @0226 */
  439. char pgup[]="PgUp";    /* @0226 */
  440. char u[]="%u";        /* @0226 */
  441. char yes[]="YES";       /* @0254 */
  442. char no[]="NO";         /* @0254 */
  443. /* @0264 */
  444.   char rbshdr[3]={0x43,0x06,0x0A};      /* ru-header RBS */  /* 1005 */
  445.   char rhhdr[3]={0x0b,0x80,0x00};       /* rh-header     */  /* 1008 */
  446.   char rrbshdr[3]={0x43,0x06,0x1A};      /* ru-header RRBS */  /* 1008 */
  447.   char drlhdr[3]={0x43,0x06,0x02};    /* 1005 */
  448.   char rlihdr[3]={0x43,0x06,0x12};
  449. char BIND1[25] =           /* image BIND                          1016 */
  450.  {0x01,    /*  0 */                                          /* 1016 */
  451.  0x03,      /*  1 */                                         /* 1016 */
  452.  0x03,        /*  2 */                                       /* 1016 */
  453.  0xa0,        /*  3 */                                       /* 1016 */
  454.  0xd0,        /*  4 */                                       /* 1016 */
  455.  0x20,        /*  5 */                                       /* 1016 */
  456.  0x80,      /*  6 */                                         /* 1016 */
  457.  0x00,0x00,        /*  7 */                                  /* 1016 */
  458.  0x85,0x85,  /* 8-9 */                                       /* 1016 */
  459.  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,          /* 1016 */
  460.  0x00,0x00,0x00,0x00};        /* 10-24 */               /* 1016 */
  461. char vt[]="VT  ";       /* @0226 */
  462. char l_s[]="LS-";    /* @0226 */
  463. char bindhdr[3]={0x6B,0x80,0x00};
  464. char bindfhdr[3]={0x81,0x06,0x85};
  465. short wver=0x0003;                  /* version           1010  */
  466. /* @0264 */
  467. int  vis_attr=0;                /* @0227 */
  468. short help28=0;        /* @0233 */
  469.  struct ovpp {                   /* 5001 */
  470.        struct rqb *wrqb;         /* 5001 */
  471.        void *xmit_queue_one;     /* 5001 */
  472.        };                        /* 5001 */
  473. typedef  struct {
  474.      char address[18];
  475.      }PRD;
  476. typedef  struct {
  477.      short buffer[2000];
  478.      }DIR;
  479. typedef  struct {
  480.      short buffer_pool[3000];
  481.      char buf_id;
  482.      }DLC;
  483. typedef  struct {
  484.      short id_station;
  485.      char count;
  486.      }XMTWO;
  487. typedef  struct {
  488.      XMTWO *xm2;
  489.      short rezerv;
  490.      short length_in_buffer;
  491.      short user_data;
  492.      short user_length;
  493.      char user_space[50];       /* 5001 */
  494.      }XMONE;
  495. typedef struct {
  496.     char id_station1;
  497.     char id_station2;
  498.     char id_station3;
  499.     char id_station4;
  500.     char id_station5;
  501.     char id_station6;
  502.     }DEST;
  503. typedef  struct {
  504.      char blok[58];
  505.      char buf_entr[255];
  506.      } BUFDRV;
  507. typedef  struct {
  508.      char outbuf[255];
  509.      }ONE;
  510. typedef  struct {
  511.      char buf_begin;
  512.      char buf_end;
  513.      }TWO;
  514. typedef  struct {
  515.      short station_id;     /*¿ñÑ¡Γ¿Σ¿¬áΓ«p ßΓᡵ¿¿*/
  516.      short buffer_left;    /*¬«½¿τÑßΓó« «ßΓáóΦ¿σß∩ íπΣÑp«ó*/
  517.      char buffer_get;      /*¬«½¿τÑßΓó« íπΣÑp«ó ñ½∩ »«½πτÑ¡¿∩*/
  518.      char res[3];
  519.      ONE *xm1;           /*áñpÑß »Ñpó«ú« »p¿¡∩Γ«ú« íπΣÑpá*/
  520.      }TGET;
  521. typedef  struct {
  522.      short station_id;
  523.      short buffer_left;
  524.      char reserv[4];
  525.      ONE *xm1;
  526.      }TFREE;
  527. typedef  struct {
  528.      short sap_station_id;
  529.      short link_station_id;
  530.      char timer_t1;
  531.      char timer_t2;
  532.      char timer_ti;
  533.      char maxout;
  534.      char maxin;
  535.      char maxout_incr;
  536.      char max_retry_cnt;
  537.      char rsap_value;
  538.      short max_i_field;
  539.      char access_priority;
  540.      char nul;
  541.      DEST *pdad;
  542.      }TOPEN;
  543. typedef struct {
  544.      short station_id;
  545.      char transmit_fs;
  546.      char rsap;
  547.      XMONE *xm1;
  548.      XMTWO *xm2;
  549.      short buffer_len_one;
  550.      short buffer_len_two;
  551.      ONE *pbo;
  552.      TWO *pbt;
  553.      }TWRITE;
  554. typedef struct {
  555.     int point_id;
  556.     }POINT;
  557. typedef  struct {
  558.      char adapter;
  559.      char node_address[6];
  560.      short num_rsv_buffers;
  561.      short rcv_buffer_len;
  562.      short dnb_buffer_len;
  563.      char data_hold_buf;
  564.      PRD * pia;
  565.      short dir_buf_size;
  566.      short dir_pool_blocks;
  567.      DIR *buf1;
  568.      char dlc_max_sta;
  569.      void  *received_data;
  570.      short *open_data;
  571.      char maxout;
  572.      char maxin;
  573.      char station_count;
  574.      short dlc_buf_size;
  575.      short dlc_pool_len;
  576.      DLC *buf2;
  577.      }OPEN;
  578. typedef  struct {
  579.      short station_id[255];
  580.      short *close_data;
  581.      }CLOSE;
  582. typedef  struct {
  583.      char command;
  584.      short station_id;
  585.      XMONE *xm1;
  586.      XMTWO *xm2;
  587.      short buffer_len_one;
  588.      short buffer_len_two;
  589.      ONE *pbo;
  590.      TWO *pbt;
  591.      short *close_data;
  592.      }WRITE;
  593. typedef struct {
  594.     short sap_station_id;
  595.     char maxout;
  596.     char maxin;
  597.     char rsap_value;
  598.     char access_priority;
  599.     DEST *dad;
  600.     short *ioctl_data;
  601.     short station_id;
  602.     char option;
  603.     short *received_data;
  604.     }OPEN_STATION;
  605. typedef struct {
  606.     short station_id_1b;
  607.     short *route ;
  608.     short *connect_data;
  609.     }CONNECT_STATION;
  610. typedef struct {
  611.     short station_id;
  612.     short *close_station_data;
  613.     }CLOSE_STATION;
  614. typedef struct {
  615.     short station_id;
  616.     char buffer_get;
  617.     short *get_data;
  618.     }GET;
  619. typedef struct {
  620.     short station_id;
  621.     ONE *pbo;
  622.     short *free_data;
  623.     }FREE;
  624. typedef struct {
  625.      char ccb_adapter;
  626.      char ccb_command;
  627.      char ccb_retcode;
  628.      char ccb_work;
  629.      POINT *pnt;
  630.      void *cplt;
  631.      void *tab;
  632.        } CCB;
  633. typedef struct {
  634.         void *buf_pointer;
  635.     short rcv_len;
  636.     short length_in_buffer;
  637.     short adapter_offset;
  638.     short user_length;
  639.     short station_id;
  640.     char options;
  641.     char message_type;
  642.     short buffer_left;
  643.     char rcv_fs;
  644.     char adapter_num;
  645.     char lan_header_length;
  646.     char dlc_header_length;
  647.     struct {
  648.             unsigned char ac;
  649.         unsigned char fc;
  650.         char dnode_addr[6];
  651.         char onode_addr[6];
  652.          struct {
  653.             unsigned dl:5;
  654.             unsigned tm:3;
  655.             unsigned rs:4;
  656.             unsigned d:1;
  657.             unsigned nk:3;
  658.             short ukm1;
  659.             short ukm2;
  660.             short ukm3;
  661.             short ukm4;
  662.             short ukm5;
  663.             short ukm6;
  664.             short ukm7;
  665.             short ukm8;
  666.               }im;
  667.                  }lan_header;
  668.     long dlc_header;
  669.     char rcvd_data;
  670.     }RECEIVE_BUF1;
  671. typedef struct{
  672.     void *buf_pointer;
  673.     short rcv_len;
  674.     short length_in_buffer;
  675.     short adapter_offset;
  676.     short user_length;
  677.     char rcvd_data;
  678.     }RECEIVE_BUF2;
  679. /*                    /* @0282 */
  680.  CCB *PCCB=NULL;
  681.  BUFDRV *PBUF=NULL;
  682. char buffree[8]={0};         /* 5001 */
  683. char buftrn39[6500]={0};     /* 5001 */
  684. int cmd=0;
  685.  
  686. char PR1_NODE_ADDR[6]={0};   /* 5001 */
  687. short PR1_ST_ID_15=NULL;
  688. short PR1_LINK_ST_ID_19[9]={0};
  689. char mxid[20]={0,0,0,0,0,0,0,0,0xb0,8,0,0,0,0,0,0,0,0,0x0b,0x71};
  690. char wovpp[40]={0};
  691. char tbs[128*sizeof(struct tbs)]={0};
  692. char tabm[1024*sizeof(struct tabm)]={0};
  693. char adapter=NULL;
  694. short station_id15=NULL;
  695.  
  696. /*void *PBUF=NULL;*/
  697. void *CMD_CPLT=NULL;
  698. void *REC_DATA=NULL;
  699. OPEN parm_open={0};
  700. CLOSE parm_close={0};
  701. WRITE parm_write={0};
  702. OPEN_STATION parm_open_station={0};
  703. CONNECT_STATION parm_connect_station={0};
  704. CLOSE_STATION parm_close_station={0};
  705. GET parm_get={0};
  706. FREE parm_free={0};
  707. PRD product_id_addr={0};
  708. DIR dir_pool_address={0};
  709. DLC dlc_pool_addr={0};
  710. POINT ccb_pointer={0};
  711. XMONE *xmit_queue_one=NULL;
  712. XMTWO *xmit_queue_two=NULL;
  713. DEST dest_addr={0};
  714. BUFDRV bufer={0};                /* 5001 */
  715. DLC *dlc=NULL;                   /* 5001 */
  716. OPEN *pop=NULL;
  717. CLOSE *pcl=NULL;
  718. WRITE *pwr=NULL;
  719. OPEN_STATION *post=NULL;
  720. CONNECT_STATION *pcnst=NULL;
  721. CLOSE_STATION *pcst=NULL;
  722. GET *pgt=NULL;
  723. FREE *pft=NULL;
  724. DEST *det=NULL;
  725. TGET *ccb_get=NULL;
  726. TFREE *ccb_free=NULL;
  727. TOPEN *ccb_open=NULL;
  728. TWRITE *ccb_write=NULL;
  729. ONE *buffer_one=NULL;
  730. TWO *buffer_two=NULL;
  731. CCB  *parm_ccb=NULL;
  732.  
  733. char *PCCB39=NULL;          /* 5001 */
  734. struct BUFDRV *PBUF39=NULL;       /* 5001 */
  735. short (* REC_DRV_DATA1)();   /*π¬áºáΓѽ∞ ¡á »/» »α¿Ñ¼á ñá¡¡δσ*/
  736. short (* REC_DRV_DATA)();    /*π¬áºáΓѽ∞ ¡á »/» ºáóÑαΦÑ¡¿∩ ¬«¼á¡ñδ »α¿Ñ¼á*/
  737. short (* CMD_DRV)();         /*π¬áºáΓѽ∞ ¡á »/» ºáóÑαΦÑ¡¿∩ ¬«¼á¡ñ*/
  738.  
  739.  
  740. char *UCCB=NULL;       /*ôèÇçÇÆàèÄäÇ ææé.âïÄüÇï£ìǃ ÅàÉàîàììǃ äDRVINT.ASM*/
  741. char buf16[16]={0};
  742. char buf15[16]={0};
  743. char buft15[30]={0};
  744. char buf27[16]={0};
  745. char buft27[12]={0};
  746. char buf28[16]={0};
  747. char buft28[13]={0};
  748. char buf0b[16]={0};
  749. char buft0b[24]={0};
  750. char buf26[16]={0};
  751. char buft26[12]={0};
  752.  
  753. struct ccb15s *u15ccb=NULL;
  754. struct tab15s *tab15u=NULL;
  755.  
  756. struct ccb27s *u27ccb=NULL;
  757. struct tab27s *tab27u=NULL;
  758.  
  759. struct ccb16s *u16ccb=NULL;
  760.  
  761. struct ccb28s *u28ccb=NULL;
  762. struct tab28s *tab28u=NULL;
  763.  
  764. struct ccb0bs *u0bccb=NULL;
  765. struct tab0bs *tab0bu=NULL;
  766.  
  767. struct tab26s *tab26u=NULL;
  768. struct ccb26s *u26ccb=NULL;          /* 5001 */
  769. struct crec {
  770.                 void far *asc_rcv_exit;
  771.                 short asc_speed;
  772.                 unsigned char asc_width ; /* word width */
  773.                 unsigned char asc_parity; /* port & parity */
  774.                 unsigned char asc_stops; /* number of stop bits */
  775.             } rec={0};
  776. union REGS inregs={0}, outregs={0};
  777. struct SREGS segregs={0};
  778. char MSG[101]={0x00};
  779. */                   /* @0282 */
  780. short fd=0;          /* @0231 */
  781. char portpath[60]={0x00};   /* @0292 *//* @0304 */
  782. unsigned int pspseg=0;     /* @0320 */
  783. char mbreak=0x00;          /* @0320 */
  784. char *dosbreak=0;          /* @0320 */
  785. char *mdta=0;              /* @0320 */
  786. long *dosdta=0;            /* @0320 */
  787. int *dospid=0;             /* @0320 */
  788. long sample=0x5555aaaa;    /* @0320 */
  789. char *old65=0;        /* @0320 */
  790. char *ydta=0;        /* @0320 */
  791. int ypsp=0;        /* @0320 */
  792. char *old24=0;        /* @0320 */
  793. unsigned char bufvt=0x00;    /* 1082 */
  794. unsigned char buflan=0x00;   /* 1082 */
  795. struct FILELIST {        /* @0322 */
  796.   int current;
  797.   int first;
  798.   int findoff;
  799.   int total;
  800.   int files;
  801.   int dirs;
  802.   int curspos;
  803.   int insert;
  804.   int offset;
  805.   char cdir[MAXDIR+13];
  806.   unsigned char sw1,sw2,sw3;
  807.  } FL={0,0,0,0,0,0,0,0,0,NULL,0,0,0};
  808. /* O V E R L A Y */
  809.  #include "overl0.h"
  810.